<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>考试导航</title>
</head>
<body>
<div th:fragment="PaperNav">
    <style>
        .navbar-paper {
            background-color: #3498db;
            border-color: #2980b9;
            border-radius: 0;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .navbar-paper .navbar-brand {
            color: #fff;
            font-weight: 600;
        }
        
        .navbar-paper .navbar-nav > li > a {
            color: #ecf0f1;
            transition: all 0.2s ease;
        }
        
        .navbar-paper .navbar-nav > li > a:hover,
        .navbar-paper .navbar-nav > li > a:focus {
            color: #fff;
            background-color: #2980b9;
        }
        
        .navbar-paper .navbar-nav > .active > a,
        .navbar-paper .navbar-nav > .active > a:hover,
        .navbar-paper .navbar-nav > .active > a:focus {
            color: #fff;
            background-color: #2980b9;
        }
        
        .logout-btn {
            cursor: pointer;
        }
    </style>
    
    <nav class="navbar navbar-paper navbar-static-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand">在线考试系统</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a><i class="glyphicon glyphicon-edit"></i> 考试中心</a></li>
                    <li><a><i class="glyphicon glyphicon-list-alt"></i> 考试历史</a></li>
                    <li><a><i class="glyphicon glyphicon-lock"></i> 修改密码</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li class="active"><a><span class="glyphicon glyphicon-user"></span> <span th:text="${session.lis.getTruename()}"></span>（学生）</a></li>
                    <li><a class="logout-btn" onclick="loginOut()"><span class="glyphicon glyphicon-off"></span> 退出系统</a></li>
                </ul>
            </div>
        </div>
    </nav>
    
    <script>
        function loginOut() {
            if(confirm('确定要退出系统吗?')) {
                location.replace("./logout");
            }
        }
    </script>
</div>
</body>
</html>